import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../index.dart';

/// 活动组件
class HelloWidget extends GetView<ActivteController> {
  const HelloWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Obx(() {
        final selectedActivity = controller.state.selectedActivity.value;
        return Text(
          selectedActivity != null 
              ? selectedActivity.title 
              : '没有选中的活动',
          style: const TextStyle(
            fontSize: 16, 
            fontWeight: FontWeight.bold
          ),
        );
      }),
    );
  }
}
